<template>
    <div class="upload">
        <divider style="padding: 0 10px">
            <p>列表模式</p>
        </divider>
        <div>
            <upload @remove-img="remove" @request-img="sendImg"></upload>
        </div>
        <divider style="padding: 0 10px">
            <p>显示模式</p>
        </divider>
        <div>
            <upload @remove-img="remove" @request-img="sendImg" :is-list="false"></upload>
        </div>
    </div>
</template>

<script>
    import upload from '../components/uploadImg'
    import divider from '../components/divider'

    export default {
        name: 'upload-img',
        components: {
            upload,
            divider
        },
        data() {
            return {
                isShow: false,
                dialogIsShow: false
            }
        },
        methods: {
            remove(res) {
                window.console.log(res)
                this.$myConfirm.show({
                    content: '图片删除~~~~'
                })
            },
            async sendImg(data) {
                window.console.log(data)
                this.$toast.show({
                    time: 1000,
                    text: '图片发送~~~~'
                })
            }
        }
    }
</script>

<style lang="less" scoped>
    .upload {
        width: 100%;
        height: 100%;
    }

    .item {
        box-sizing: border-box;
        position: relative;
        img {
            width: 100%;
            height: 100%;
        }
    }
</style>
